#include<stdio.h>
int main()
{
    int N,s,i,sum;
    s=1,sum=0;
    scanf("%d",&N);
    for(i=1;i<=N;i++)
    {
        s=s*i;
        sum+=s;
    }
    printf("%d\n",sum);
    
    return 0;
}
